﻿
IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_CF_GetFile_V2]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_CF_GetFile_V2];
GO

CREATE PROCEDURE [dbo].[sproc_CF_GetFile_V2]
    @FileID int 
AS
BEGIN
SET NOCOUNT ON;

SELECT
    F.*,
    G.Catalog
FROM dbo.UDS_CF_File F INNER JOIN dbo.UDS_CF_Catalog G ON F.CatalogID = G.CatalogID
WHERE F.FileID = @FileID;

END
GO
